refactor(hugrv2)!: Rename Terms to clarify (runtime) Types from static parameter Kinds#3019
refactor(hugrv2)!: Rename Terms to clarify (runtime) Types from static parameter Kinds#3019acl-cqc wants to merge 7 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3019 +/- ##
==========================================
- Coverage 81.09% 81.09% -0.01%
==========================================
Files 241 241
Lines 45054 45050 -4
Branches 38822 38818 -4
==========================================
- Hits 36536 36532 -4
Misses 6542 6542
Partials 1976 1976
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance
Comparing Footnotes
|
2dec804 to
b45e61f
Compare
|
This PR contains breaking changes to the public Rust API. cargo-semver-checks summary |
45f1367 to
6ea5e65
Compare
cqc-alec
left a comment
There was a problem hiding this comment.
Thanks!
Should we also change TermTypeError::TypeMismatch { term, type_} to TermTypeError::KindMismatch {value, kind}? I guess we should??
Yes I guess we should do that as well.
I am gonna do that as a followup because I realize there is also TermTypeError (=> TermKindError?) |
[Note: this will textually conflict with #3022, will have to merge whichever is approved second but I think should b straightforward.]
Using
Typeto mean a static parameter (that accepts a static Term argument) is confusing; instead keep Type as meaning a type of runtime valuesTerm::RuntimeTypebecomesTerm::TypeKindTerm::XXXTypebecomesTerm:::XXXKind(e.g.StringType->StringKind,ListType->ListKind)Term::RuntimeXXXbecomesTerm::XXXType(e.g.Term::RuntimeExtension->Term::ExtensionType)check_term_type->check_term_kindTermTypeError -> TermKindError to follow in another PR.
BREAKING CHANGE: many renames of variants of Term; ...Types are now Kinds, Runtime... are now Types. Also check_term_type is now check_term_kind